<extend name="./Common/View/Public/list.html" />

<block name="page_title">模板列表</block>

<block name="search">
    <div class="layui-input-inline">
        <select name="status" id="status" lay-filter="status" api="sys/Dict/info/code/STATUS" empty="状态"></select>
    </div>
    <div class="layui-input-inline">
        <input class="layui-input" name="keywords" autocomplete="off" placeholder="名称" />
    </div>
</block>

<block name="toolbar">
    {:W('Todo/UI/toolbar',array('模板',array('add','delete','enable','disable')))}
</block>

<block name="main">
    <script type="text/javascript">
        var list = {api:"{$Think.const.MODULE_NAME}/{$Think.const.CONTROLLER_NAME}/"};
        list.columns =  [[
            {checkbox: true, fixed: true}
            , {field:'title', minWidth:200, title : '模板名称'}
            , {field: 'level', title: '指标层级', width: 150, sort: true}
            , {field: 'status', title: '状态', width: 80, sort: true, templet: '#tpl_status'}
            ,{fixed: 'right', title: '操作', width:150, align:'center', toolbar: '#tpl_bar'}
        ]];
    </script>
    <script type="text/html" id="tpl_bar">
        {{ format_optbar(['edit','delete', 'view']) }}
    </script>
    <script type="text/html" id="tpl_status">
        {{ format_status(d.status) }}
    </script>
</block>